package com.timon.sla;

import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.net.Socket;

public class Client {
	public static void main(String[] args) throws Exception {
		Socket server = new Socket("192.168.71.84", 139);
		
		System.out.println("Connect sucessfully ");
		BufferedReader in = new BufferedReader(new InputStreamReader(server
				.getInputStream()));
		PrintWriter out = new PrintWriter(server.getOutputStream());

		BufferedReader wt = new BufferedReader(new InputStreamReader(System.in));

		while (true) {
			System.out.print("cmd: ");
			String str = wt.readLine();

			out.println(str);
			out.flush();

			if (str.equals("end")) {
				break;
			}
			System.out.println("Receive :" + in.readLine());
		}
		server.close();
	}
}
